<template>
  <div class="exter-commun-box">
    <dg-table
      class="table"
      ref="table"
      url="/v1/indexInfo/leaderConcern"
      :condition="condition"
      :sorts="{ prop: 'sendTime', order: 'descending' }"
    >
      <dg-table-column label="序号" type="index" width="70" fixed="left" />

      <dg-table-column label="紧急程度">
        <template slot-scope="{ row }">
          <div v-if="!$lodash.isEmpty( row.jjcd )" :class="`urgentLevel urgentLevel${row.jjcd}`">
            <span v-translate="{ code: BM_JJCD, value: row.jjcd }"></span>
          </div>
          <span v-else>-</span>
        </template>
      </dg-table-column>

      <dg-table-column label="上报时间" prop="sendTime">
        <template slot-scope="{ row }">
          <span>{{ row.sendTime| filterValue}}</span>
        </template>
      </dg-table-column>

      <dg-table-column label="编号" prop="serialNo">
          <template slot-scope="{ row }">
          <span>{{ row.serialNo| filterValue}}</span>
        </template>
      </dg-table-column>

      <dg-table-column label="标题" prop="title">
        <template slot-scope="{ row }">
          <dg-button v-if="!$lodash.isEmpty( row.title )" type="text" @click="routeToClueDetail(row)">{{ row.title }}</dg-button>
          <span v-else>-</span>
        </template>
      </dg-table-column>

      <dg-table-column label="信息状态">
        <template slot-scope="{ row }">
          <span v-if="!$lodash.isEmpty( row.xxzt )" v-translate="{ code: BM_QSZT, value: row.xxzt }"></span>
          <span v-else>-</span>
        </template>
      </dg-table-column>

    </dg-table>
  </div>
</template>

<script>
import { deepClone } from '@/utils/common';
import { BM_JJCD, BM_QSZT } from '@/common/codeDic';
import { routeToClueDetail } from '@/utils/data-utils';

export default {
  name: 'jleader-follow',
  data() {
    return {
      BM_QSZT,
      BM_JJCD,
      // 列表查询条件
      //  gzlb 1是局领导关注2是领导关注
      condition: {
        gzlb: {
          value: '2',
          op: '='
        }
      },
      cloneCondition: null,
      routeToClueDetail
    };
  },
  watch: {},
  computed: {},
  mounted() {
    this.cloneCondition = deepClone(this.condition);
  },
  methods: {},
  filters:{
    // 判空
     filterValue(val){
       let result="-";
       if(val){
         result=val;
       }
       return result;
     }
  }
};
</script>
